function findzero(place,hear,height,width){
    var name;
    if((height-1)>=0 && document.getElementById(hear+(height-1)+"_"+width).parentNode.bgColor=="black" && document.getElementById(hear+(height-1)+"_"+width).attributes[0].value!="Images/qi.png")
    {
        name=document.getElementById(hear+(height-1)+"_"+width).name;
        changeimage((hear+(height-1)+"_"+width),name);
        document.getElementById(hear+(height-1)+"_"+width).parentNode.bgColor="";
        if(name=="0") findzero(place,hear,height-1,width);

    }
    if((height+1)<=(place.height-1) && document.getElementById(hear+(height+1)+"_"+width).parentNode.bgColor=="black" && document.getElementById(hear+(height+1)+"_"+width).attributes[0].value!="Images/qi.png")
    {
        name=document.getElementById(hear+(height+1)+"_"+width).name;
        changeimage((hear+(height+1)+"_"+width),name);
        document.getElementById(hear+(height+1)+"_"+width).parentNode.bgColor="";
        if(name=="0") findzero(place,hear,height+1,width);
    }
    if((width-1)>=0 && document.getElementById(hear+height+"_"+(width-1)).parentNode.bgColor=="black" && document.getElementById(hear+height+"_"+(width-1)).attributes[0].value!="Images/qi.png")
    {
        name=document.getElementById(hear+height+"_"+(width-1)).name;
        changeimage((hear+height+"_"+(width-1)),name);
        document.getElementById(hear + height + "_" + (width - 1)).parentNode.bgColor = "";
        if(name=="0") findzero(place, hear, height, width - 1);
    }
    if((width-1)>=0 && (height-1)>=0 && document.getElementById(hear+(height-1)+"_"+(width-1)).parentNode.bgColor=="black" && document.getElementById(hear+(height-1)+"_"+(width-1)).attributes[0].value!="Images/qi.png")
    {
        name=document.getElementById(hear+(height-1)+"_"+(width-1)).name;
        changeimage((hear+(height-1)+"_"+(width-1)),name);
        document.getElementById(hear+(height-1)+"_"+(width-1)).parentNode.bgColor="";
        if(name=="0") findzero(place,hear,height-1,width-1);
    }
    if((width-1)>=0 && (height+1)<=(place.height-1) && document.getElementById(hear+(height+1)+"_"+(width-1)).parentNode.bgColor=="black" && document.getElementById(hear+(height+1)+"_"+(width-1)).attributes[0].value!="Images/qi.png")
    {
        name=document.getElementById(hear+(height+1)+"_"+(width-1)).name;
        changeimage((hear+(height+1)+"_"+(width-1)),name);
        document.getElementById(hear+(height+1)+"_"+(width-1)).parentNode.bgColor="";
        if(name=="0") findzero(place,hear,height+1,width-1);
    }
    if((width+1)<=(place.width-1) && document.getElementById(hear+height+"_"+(width+1)).parentNode.bgColor=="black" && document.getElementById(hear+height+"_"+(width+1)).attributes[0].value!="Images/qi.png")
    {
        name=document.getElementById(hear+height+"_"+(width+1)).name;
        changeimage((hear+height+"_"+(width+1)),name);
        document.getElementById(hear+height+"_"+(width+1)).parentNode.bgColor="";
        if(name=="0") findzero(place,hear,height,width+1);
    }
    if((width+1)<=(place.width-1) && (height-1)>=0 && document.getElementById(hear+(height-1)+"_"+(width+1)).parentNode.bgColor=="black" && document.getElementById(hear+(height-1)+"_"+(width+1)).attributes[0].value!="Images/qi.png")
    {
        name=document.getElementById(hear+(height-1)+"_"+(width+1)).name;
        changeimage(hear+(height-1)+"_"+(width+1),name);
        document.getElementById(hear+(height-1)+"_"+(width+1)).parentNode.bgColor="";
        if(name=="0") findzero(place,hear,height-1,width+1);
    }
    if((width+1)<=(place.width-1) && (height+1)<=(place.height-1) && document.getElementById(hear+(height+1)+"_"+(width+1)).parentNode.bgColor=="black" && document.getElementById(hear+(height+1)+"_"+(width+1)).attributes[0].value!="Images/qi.png")
    {
        name=document.getElementById(hear+(height+1)+"_"+(width+1)).name;
        changeimage((hear+(height+1)+"_"+(width+1)),name);
        document.getElementById(hear+(height+1)+"_"+(width+1)).parentNode.bgColor="";
        if(name=="0") findzero(place,hear,height+1,width+1);
    }
}